package com.example.seh.util;

import java.math.BigDecimal;

public class MyMathUtil {
    public static double getNum(double num) {
        BigDecimal b = new BigDecimal(num);
        //保留2位小数
        double result = b.setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue();
        return result;
    }
}
